<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/14
 * Time: 17:20
 */

namespace app\api\validate;
use think\Validate;

class TestValidate extends  Validate
{
    protected $rule  = [
            'name' => 'require|max:10',
            'email' => 'email',
            'id' => 'require|in:1,2,3',
        ];

    protected $message = [
        'name.require' => '名称必填',
        'id.in' => 'id必在1，2，3中',
    ];
}